<?php
class Form_User_Login extends QForm
{
    function __construct($action)
    {
        // 调用父类的构造函数
        parent::__construct(__CLASS__, $action);
 
        // 从配置文件载入表单
        $filename = rtrim(dirname(__FILE__), '/\\') . DS . 'login.yaml';
        $this->loadFromConfig(Helper_YAML::loadCached($filename));
        $this->addValidations(User::meta());
        
        $this->element('returnUrl')->set('value',QContext::instance()->returnUrl);
    }
}
?>